<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        table {
            width: 1000px;
            margin: 100px auto;
            border-collapse: collapse;
        }

        table thead {
            background-color: #7ec9ec;
        }

        table tbody tr {
            height: 30px;
            border-bottom: 1px solid #ccc;
        }

        table tbody tr td {
            color: #4f4fb9;
            line-height: 30px;
            text-align: center;
        }
    </style>
</head>

<body>
    <table>
        <thead>
            <tr>
                <th>代码</th>
                <th>名称</th>
                <th>最新公布净值</th>
                <th>累计净值</th>
                <th>前单位净值</th>
                <th>净值增长率</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td>962t00+</td>
                <td>P20</td>
                <td>620'1</td>
                <td>S20'L</td>
                <td>亲单巩工维半自少8事季能泌</td>
                <td>9ZSE00</td>
            </tr>
            <tr>
                <td>962t00+</td>
                <td>P20</td>
                <td>620'1</td>
                <td>S20'L</td>
                <td>亲单巩工维半自少8事季能泌</td>
                <td>9ZSE00</td>
            </tr>
            <tr>
                <td>962t00+</td>
                <td>P20</td>
                <td>620'1</td>
                <td>S20'L</td>
                <td>亲单巩工维半自少8事季能泌</td>
                <td>9ZSE00</td>
            </tr>
            <tr>
                <td>962t00+</td>
                <td>P20</td>
                <td>620'1</td>
                <td>S20'L</td>
                <td>亲单巩工维半自少8事季能泌</td>
                <td>9ZSE00</td>
            </tr>
            <tr>
                <td>962t00+</td>
                <td>P20</td>
                <td>620'1</td>
                <td>S20'L</td>
                <td>亲单巩工维半自少8事季能泌</td>
                <td>9ZSE00</td>
            </tr>
        </tbody>
    </table>
    <script>
        var row = document.querySelector('tbody').querySelectorAll('tr');
        for (var i = 0; i < row.length; i++) {
            row[i].onmouseover = function () {
                this.style.backgroundColor = '#ccc';
            }
            row[i].onmouseleave = function () {
                for (var i = 0; i < row.length; i++) {
                    row[i].style.backgroundColor = '#fff';
                }
            }

        }
    </script>
</body>

</html>